<script setup>
import Movie from './Goods.vue'
import {reactive, ref} from 'vue'
var allData = ref()
function receive_shopdata(){
    fetch("/api/demo/getallitems?typeIndex=2")
.then((data)=>{
    return data.json()
}).then((data)=>{
    console.log(data)
    allData.value = data
})
}
receive_shopdata()

</script>

<template>
<div class="showshop">
    <a href="https://gitee.com/yihyp/hyp-vue.git">代码参考链接：https://gitee.com/yihyp/hyp-vue.git</a>
    <h1 style="text-align: center;">Welcomyou This is Shopping</h1>
    <Movie
    v-for="(item,index) in allData"
    :desc="allData[index].desc"
    :title="allData[index].title"
    :imgurl="allData[index].picPaths"
    ></Movie>
</div>

</template>

<style>


</style>